package cn.xinfei.xdecision.engine.runner.executor;

import lombok.Data;

public class NodeDurationModel {

    private long clearDuration;
    private long getValueDuration;
    private long getNodeInputDuration;
    private long trackDuration;
    private long runNodeDuration;
    private long setNodeOutputDuration;
    private long terminalDuration;
    private long getNodeOutputDuration;
    private long afterDuration;
    private long nodeDuration;

    private long start=System.currentTimeMillis();

    public long getNodeDuration() {
        return nodeDuration;
    }

    public void setNodeDuration( ) {
        this.nodeDuration = System.currentTimeMillis();
    }

    public long getAfterDuration() {
        return afterDuration;
    }

    public void setAfterDuration( ) {
        this.afterDuration = System.currentTimeMillis();
    }

    public long getTrackDuration() {
        return trackDuration;
    }

    public void setTrackDuration( ) {
        this.trackDuration = System.currentTimeMillis();
    }

    public long getClearDuration() {
        return clearDuration;
    }

    public void setClearDuration() {
        this.clearDuration = System.currentTimeMillis();
    }

    public long getGetValueDuration() {
        return getValueDuration;
    }

    public void setGetValueDuration() {
        this.getValueDuration = System.currentTimeMillis();
    }

    public long getGetNodeInputDuration() {
        return getNodeInputDuration;
    }

    public void setGetNodeInputDuration() {
        this.getNodeInputDuration = System.currentTimeMillis();
    }

    public long getRunNodeDuration() {
        return runNodeDuration;
    }

    public void setRunNodeDuration() {
        this.runNodeDuration = System.currentTimeMillis();
    }

    public long getSetNodeOutputDuration() {
        return setNodeOutputDuration;
    }

    public void setSetNodeOutputDuration() {
        this.setNodeOutputDuration = System.currentTimeMillis();
    }

    public long getTerminalDuration() {
        return terminalDuration;
    }

    public void setTerminalDuration() {
        this.terminalDuration = System.currentTimeMillis();
    }

    public long getGetNodeOutputDuration() {
        return getNodeOutputDuration;
    }

    public void setGetNodeOutputDuration( ) {
        this.getNodeOutputDuration = System.currentTimeMillis();
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start ) {
        this.start = start;
    }

    @Override
    public String toString() {
        return "NodeDurationModel{" +
                "clearDuration=" + (clearDuration-start) +
                ", getValueDuration=" + (getValueDuration-clearDuration) +
                ", trackDuration=" + (trackDuration-getValueDuration) +
                ", runNodeDuration=" + (runNodeDuration-trackDuration) +
                ", setNodeOutputDuration=" + (setNodeOutputDuration-runNodeDuration) +
                ", terminalDuration=" + (terminalDuration-setNodeOutputDuration) +
                ", getNodeOutputDuration=" + (getNodeOutputDuration-terminalDuration) +
                ", getNodeInputDuration=" + (getNodeInputDuration-getNodeOutputDuration) +
                ", afterDuration=" + (afterDuration-getNodeInputDuration) +
                ", nodeDuration=" + (nodeDuration-start) +
                '}';
    }
}
